package exception_exercise;

public class FinallyDemo1 {
    public static void main(String[] args) {
        System.out.println("程序开始");
        try{
            String line1=null;
            //String line1="";
            System.out.println(line1.length());
            return;
        }catch (Exception e1){
            System.out.println("出现错并解决了");
        }finally {
            System.out.println("finally中的代码执行了");
        }
        System.out.println("程序结束");
    }
}
